#ifndef CAT_H
#define CAT_H

#include "Animal.h"
#include <string>

class Cat : public Animal {
private:
    std::string eyeType;

public:
    // 有参构造函数
    Cat(std::string name, std::string color, int legNum, std::string eyeType);

    // set 和 get 方法
    void setEyeType(std::string eyeType);
    std::string getEyeType() const;

    // 重写介绍自己的方法
    void introduce() const override;
};

#endif
#include "Cat.h"

Cat::Cat(std::string name, std::string color, int legNum, std::string eyeType) 
    : Animal(name, color, legNum), eyeType(eyeType) {}

void Cat::setEyeType(std::string eyeType) {
    this->eyeType = eyeType;
}

std::string Cat::getEyeType() const {
    return eyeType;
}

void Cat::introduce() const {
    std::cout << "我是一只猫，名字叫" << getName(1) << "，毛色是" << getColor(blue) << "，有" << getLegNum(4) << "条腿，猫眼类型是" << eyeType << "，我会喵喵喵叫。" << std::endl;
}